#!/bin/bash

# SSH远程控制工具中继服务器删除部署脚本

echo "停止并禁用SSH Relay服务..."
sudo systemctl stop ssh-relay
sudo systemctl disable ssh-relay
sudo rm /etc/systemd/system/ssh-relay.service
sudo systemctl daemon-reload

echo "删除Nginx反向代理配置..."
sudo rm /etc/nginx/sites-enabled/ssh-relay
sudo rm /etc/nginx/sites-available/ssh-relay
sudo systemctl reload nginx

echo "删除项目文件和用户..."
sudo rm -rf /home/sshrelay/relay-server
sudo userdel -r sshrelay

echo "服务器删除部署脚本执行完毕。"


